{% extends "base.html" %}
{% block title %}预约失败{% endblock %}
{% block head %}
    {{ super() }}
    <style>
        h2 {
            align-items: center;
            justify-content: center;
            padding: 15px;
        }

        img {
            margin-right: 5px;
        }
    </style>
{% endblock %}
{% block body %}
    <div class="contianer info-page">
        <div class="weui-well text-center">
            <h2 class="weui-flex"><img src="/static/images/fail.png">
                {{ "调整" if type!="hand" }}预约失败！
            </h2>
            <div style="padding: 10px;">失败原因：{{ err }}。</div>
            <div>如有需要，请联系前台，谢谢！</div>
        </div>
    </div>
{% endblock %}
{% block script %}
    {{ super() }}
    <script type="text/javascript">
        $(function () {
            pushHistory();
            var bool = false;
            setTimeout(function () {
                bool = true;
            }, 1500);
            window.addEventListener("popstate", function (e) {
                if (bool) {
                    window.location.href = navRoot;
                }
                pushHistory();

            }, false);

            function pushHistory() {
                var state = {
                    title: "error",
                    url: ""
                };
                window.history.pushState(state, "error", "");
            }
        })
    </script>
{% endblock %}